package svc

import (
	"github.com/comfygpt-backend-go/service/component-api/internal/config"
	"github.com/comfygpt-backend-go/service/component-rpc/componentservice"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config config.Config

	ComponentRpc componentservice.ComponentService
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,

		ComponentRpc: componentservice.NewComponentService(zrpc.MustNewClient(c.ComponentRpc)),
	}
}
